import { createRouter, createWebHistory } from 'vue-router'
import ShuFaHome from '../views/ShuFaHome.vue'
import ShufaDetail from '@/views/ShufaDetail.vue'
import ShuFaWorks from '../views/ShuFaWorks.vue'
import ShuFaWorkDetail from '../views/ShufaWorkDetail/index.vue'
import Award from '@/views/ShufaAward.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: ShuFaHome,
    },
    {
      path: '/works',
      name: 'works',
      component: ShuFaWorks,
    },
    {
      path: '/award',
      name: 'award',
      component: Award,
    },
    {
      path: '/detail',
      name: 'detail',
      component: ShufaDetail,
    },
    {
      path: '/workDetail',
      name: 'workDetail',
      component: ShuFaWorkDetail,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
  ],
})

export default router
